class User < ActiveRecord::Base
  has_many :bets
  attr_accessor :is_new_user

  def self.find_or_create(fb_user)
    user = User.first(:conditions => {:fb_id => fb_user.id.to_i})
    if user.nil?
      user = User.create({:fb_id => fb_user.id})
      user.is_new_user = true
    else
      user.is_new_user = false
    end
    user
  end

end
